﻿<%@ Page Title="" Language="C#" MasterPageFile="~/common/AfterLogin.master" AutoEventWireup="true" CodeFile="terminate.aspx.cs" Inherits="terminate" %>

<asp:Content ID="leftMenu" ContentPlaceHolderID="leftMenu" Runat="Server">
          <li><a href="<%= Page.ResolveUrl("~/product/fixed_deposit/user/fd_statement.aspx")%>">
        E-Statement</a></li>

        <li><a href="<%= Page.ResolveUrl("~/product/fixed_deposit/user/certificate.aspx")%>">
         Deposit Certificate</a></li>

         <li><a href="<%= Page.ResolveUrl("~/product/fixed_deposit/user/appform.aspx")%>">
         Application Form</a></li>

         <li><a href="<%= Page.ResolveUrl("~/product/fixed_deposit/user/terminate.aspx")%>">
         Terminate Account</a></li>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="content" Runat="Server">
   
    <h1>Withdrawal</h1>
    <br />
      <asp:GridView ID="gvAcc" runat="server" AutoGenerateColumns="False"  
        CellPadding="3" DataKeyNames="accountNo" 
        DataSourceID="AccDataSource" onrowcommand="gvAcc_RowCommand" 
        BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" 
        BorderWidth="1px" CellSpacing="2" >
        <AlternatingRowStyle BackColor="White" />
          <Columns>
              <asp:BoundField DataField="accountNo" HeaderText="Account No" ReadOnly="True" 
                  SortExpression="accountNo" />
              <asp:BoundField DataField="certNo" HeaderText="Certificate No" 
                  SortExpression="certNo" />
                   <asp:TemplateField HeaderText="Depositor"   SortExpression="lastname">
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%#Eval("fName")+ " " + Eval("lName")%>' ></asp:Label>

                </ItemTemplate>

                </asp:TemplateField>
              <asp:BoundField DataField="fName" HeaderText="fName" SortExpression="fName" 
                  Visible="False" />
              <asp:BoundField DataField="lName" HeaderText="lName" SortExpression="lName" 
                  Visible="False" />
              <asp:BoundField DataField="DepositAmount" HeaderText="Deposit Amount" 
                  SortExpression="DepositAmount" />
              <asp:BoundField DataField="tenors" 
                  HeaderText="Tenors" SortExpression="tenors" />
              <asp:BoundField DataField="effectiveDate" HeaderText="Effective Date" 
                  SortExpression="effectiveDate" DataFormatString="{0:d}" />
              <asp:BoundField DataField="maturityDate" DataFormatString="{0:d}" 
                  HeaderText="Maturity Date" SortExpression="maturityDate" />
              <asp:BoundField DataField="status" HeaderText="Status" 
                  SortExpression="status" />
              <asp:ButtonField ButtonType="Button" CommandName="withdraw" Text="Withdraw"/>
          </Columns>
          <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
          <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
          <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
          <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
          <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
          <SortedAscendingCellStyle BackColor="#FFF1D4" />
          <SortedAscendingHeaderStyle BackColor="#B95C30" />
          <SortedDescendingCellStyle BackColor="#F1E5CE" />
          <SortedDescendingHeaderStyle BackColor="#93451F" />
    </asp:GridView>
    <br />
    <asp:SqlDataSource ID="AccDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        
        SelectCommand="SELECT [accountNo], [certNo], [fName], [lName], [DepositAmount], [tenors], [effectiveDate], [maturityDate], [status] FROM [FIXED_DEPOSIT] WHERE ([custID] = @custID)" 
        OldValuesParameterFormatString="original_{0}">
        <SelectParameters>
            <asp:SessionParameter Name="custID" SessionField="userId" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <br />
      <br />
     
        
</asp:Content>

